Repository navigation
Conversation
Allow configuring a custom OpenAI-compatible base URL for both Anthropic and OpenAI providers. URLs can be set per-provider and are validated (https/http only, max 2048 chars). Also render AskJournal AI responses as markdown.
|
Yes, this is a very important feature. I had to add it myself. |
|
@ChristopherDownie can we conclude this? |
|
Hey @fiandev, thanks for kicking this off, and sorry it sat here for a bit! We ended up building it ourselves in a slightly different shape: instead of making the Anthropic/OpenAI base URLs editable in Settings (which could send a saved or env API key to any URL), we went with a separate OpenAI-compatible provider that has its own URL, model and optional key. It speaks Chat Completions, so Ollama, LM Studio and OpenRouter work out of the box, and proxies for the hosted providers go through the standard You'll get credit in the changelog for proposing it. Closing this one out, thanks again! (And thanks @dzamwave and @jawand for the nudge.) |
|
Quick follow-up: our version is up in #48, feel free to take a look. |
… models Adds a third AI provider, "OpenAI-compatible", for Ollama, LM Studio, OpenRouter, vLLM and other servers that speak the Chat Completions API. It has its own server URL, model and optional encrypted key, and uses @ai-sdk/openai-compatible, which never reads provider environment variables, so ANTHROPIC_API_KEY / OPENAI_API_KEY are never sent to a user-supplied URL. A saved key is bound to the URL it was saved with: saving a different URL clears it unless a new key is sent. Anthropic and OpenAI gateways keep working through the SDKs' standard ANTHROPIC_BASE_URL / OPENAI_BASE_URL variables, now documented and covered by a test. AI statement parsing stays on Anthropic and OpenAI, which accept PDFs and strict structured output. Replaces LuxAlgo#19; thanks to @fiandev for the proposal.
Allow configuring a custom OpenAI-compatible base URL for both Anthropic and OpenAI providers. URLs can be set per-provider and are validated (https/http only, max 2048 chars). Also render AskJournal AI responses as markdown.